<template>
  <div class="login-container" :class="showAppview ? 'bgimg-app' : 'bgimg'">
    <div v-if="showAppview">
      <div style="user-select: none; margin-left: 500px"></div>
      <!-- <div class="login_ti">技术驱动农业未来，数据治理食品安全</div> -->
      <!-- 内容 -->
      <div class="middle_box-app">
        <div class="middle_container-app clearfix">
          <!-- <div class="middle_container_header">
            <span>{{ login_type == 1 ? "账号登录" : "扫码登录" }}</span>
            <span><i class="el-icon-monitor" v-show="login_type == 2" @click="changeLoginType(1)"></i><i
                class="el-icon-full-screen" v-show="login_type == 1" @click="changeLoginType(2)"></i></span>
          </div> -->
          <div v-show="login_type == 1">
            <el-form
              ref="loginForm"
              :model="loginForm"
              class="login-form"
              :rules="rules"
              auto-complete="on"
              label-position="left"
            >
              <!-- <div v-if="expirationWarning">
                {{ expirationWarning }}
              </div> -->

              <div class="title-container">
                <h3 class="title">{{ rowname || info.site_title }}</h3>
                <!-- <h3 class="title">{{ rowname | info.site_title }}</h3> -->
              </div>

              <el-form-item prop="username">
                <el-input
                  ref="username"
                  v-model="loginForm.username"
                  placeholder="请输入用户名"
                  name="username"
                  type="text"
                  tabindex="1"
                  auto-complete="on"
                />
              </el-form-item>

              <el-form-item prop="password">
                <el-input
                  :key="passwordType"
                  ref="password"
                  v-model="loginForm.password"
                  :type="passwordType"
                  placeholder="请输入密码"
                  name="password"
                  tabindex="2"
                  auto-complete="on"
                  @keyup.enter.native="handleLogin"
                />
                <span class="show-pwd" @click="showPwd">
                  <svg-icon
                    :icon-class="
                      passwordType === 'password' ? 'eye' : 'eye-open'
                    "
                  />
                </span>
              </el-form-item>

              <el-button
                :loading="loading"
                type="primary"
                style="width: 100%; margin-bottom: 30px"
                @click.native.prevent="handleLogin"
                >登 录</el-button
              >

              <div class="tips boxdq">
                <el-checkbox v-model="loginForm.remember" @change="changeRember"
                  >记住密码</el-checkbox
                >
                <span @click="forget">忘记密码？</span>
              </div>
            </el-form>
          </div>
          <div class="qrcode_box" v-show="login_type == 2">
            <h3 class="qrcode_title">请使用微信扫一扫</h3>
            <div class="qrcode_container clearfix">
              <div v-if="qrcode_mask" class="mask clearfix">
                <i
                  class="el-icon-refresh-left"
                  @click="handleQrcode"
                  v-if="qrcode_loading == 1"
                ></i>
                <i class="el-icon-loading" v-if="qrcode_loading == 2"></i>
              </div>
              <img src="@/assets/images/qrcode.png" alt="" v-if="true" />
              <div id="qrcode" class="clearfix"></div>
              <div class="clearfix"></div>
            </div>
            <!-- style="color: #e84b4b" -->
            <div class="tips">
              <span
                :style="{
                  color: qrcode_tips_type == 1 ? '#e84b4b' : '#03a98e',
                }"
                >{{ qrcode_tips }}</span
              >
            </div>
          </div>
        </div>
      </div>

      <div class="login_fo-app">
        技术支持：
        <a href="http://www.caidj.cn/" target="_black">菜东家</a
        >&nbsp;&nbsp;&nbsp;版本：{{
          this.info.ver || "1.0.0"
        }}&nbsp;&nbsp;&nbsp; 联系我们：400-656-9798
      </div>
      <!-- 头部 -->
      <div class="flex-middle header" style="margin: 10px 10px">
        <img
          src="../../assets/images/login/logo.png"
          class="logo1-app"
          alt=""
        />
        <img
          src="../../assets/images/login/jishu.png"
          class="logo2-app"
          alt=""
        />
      </div>
      <!-- <div class="logo-app"></div> -->
      <!-- <div class="logo2"></div> -->
      <!-- <div class="logo3"></div>  -->

      <!-- 图形验证 -->
      <div class="puzzle-box" v-if="isVerificationShow">
        <PuzzleVerification
          v-model="isVerificationShow"
          :puzzleImgList="puzzleImgList"
          blockType="puzzle"
          width="300"
          height="175"
          blockSize="40"
          @close="close"
          :onSuccess="handleSuccess"
        />
      </div>
    </div>
    <div v-else>
      <div style="user-select: none; margin-left: 500px"></div>
      <!-- <div class="login_ti">技术驱动农业未来，数据治理食品安全</div> -->
      <!-- 头部 -->
      <div class="login-container-header flex-aro">
        <div class="flex-middle header" style="margin-top: 10px">
          <img src="../../assets/images/login/logo.png" class="logo" alt="" />
          <img src="../../assets/images/login/jishu.png" class="logo1" alt="" />
        </div>
        <div class="tip">
          <a href="http://www.caidj.cn/" class="official" target="_black"
            >菜东家官网</a
          >
          <div class="line"></div>
          <span
            @mouseenter="onMouseenter('dy')"
            @mouseleave="onMouseLeave('dy')"
            >抖音</span
          >
          <div class="line"></div>
          <span
            @mouseenter="onMouseenter('wx')"
            @mouseleave="onMouseLeave('wx')"
            >微信公众号</span
          >

          <!-- 抖音二维码 -->
          <div
            class="douyin code flex-column-start"
            :class="showDouYin ? 'show' : 'hide'"
          >
            <img src="../../assets/images/login/dyewm.png" alt="" />
            <span class="douyintitle">抖音扫码 关注菜东家</span>
          </div>

          <!-- 抖音二维码 -->
          <div
            class="wchar code flex-column-start"
            :class="showWchar ? 'show' : 'hide'"
          >
            <img src="../../assets/images/login/wxewm.png" alt="" />
            <span class="douyintitle">微信扫码 关注菜东家</span>
          </div>
        </div>
      </div>
      <!-- 内容 -->
      <div class="middle_box">
        <div class="middle_container clearfix">
          <div class="middle_container_header">
            <span>{{ login_type == 1 ? "账号登录" : "扫码登录" }}</span>
            <!-- <span
              ><i
                class="el-icon-monitor"
                v-show="login_type == 2"
                @click="changeLoginType(1)"
              ></i
              >
              <i
                class="el-icon-full-screen"
                v-show="login_type == 1"
                @click="changeLoginType(2)"
              ></i></span> -->
          </div>
          <div v-show="login_type == 1">
            <el-form
              ref="loginForm"
              :model="loginForm"
              class="login-form"
              :rules="rules"
              auto-complete="on"
              label-position="left"
            >
              <div
                class="title-ts"
                v-if="
                  Math.floor(
                    (new Date().getTime() - info.info.end_time * 1000) /
                      86400000
                  ) >= -30 &&
                  Math.floor(
                    (new Date().getTime() - info.info.end_time * 1000) /
                      86400000
                  ) < 0
                "
              >
                温馨提醒：您的系统还有{{
                  Math.abs(
                    Math.floor(
                      (new Date().getTime() - info.info.end_time * 1000) /
                        86400000
                    )
                  )
                }}天到期！
              </div>

              <div class="title-container">
                <!-- <h3 class="title">{{ info.site_title }}</h3> -->
                <h3 class="title">{{ rowname || info.site_title }}</h3>
              </div>

              <el-form-item prop="username">
                <el-input
                  ref="username"
                  v-model="loginForm.username"
                  placeholder="请输入用户名"
                  name="username"
                  type="text"
                  tabindex="1"
                  auto-complete="on"
                />
              </el-form-item>

              <el-form-item prop="password">
                <el-input
                  :key="passwordType"
                  ref="password"
                  v-model="loginForm.password"
                  :type="passwordType"
                  placeholder="请输入密码"
                  name="password"
                  tabindex="2"
                  auto-complete="on"
                  @keyup.enter.native="handleLogin"
                />
                <span class="show-pwd" @click="showPwd">
                  <svg-icon
                    :icon-class="
                      passwordType === 'password' ? 'eye' : 'eye-open'
                    "
                  />
                </span>
              </el-form-item>

              <el-button
                :loading="loading"
                type="primary"
                style="width: 100%; margin-bottom: 30px"
                @click.native.prevent="handleLogin"
                >登 录</el-button
              >

              <div class="tips boxdq">
                <el-checkbox v-model="loginForm.remember" @change="changeRember"
                  >记住密码</el-checkbox
                >
                <span @click="forget">忘记密码？</span>
              </div>
            </el-form>
          </div>
          <div class="qrcode_box" v-show="login_type == 2">
            <h3 class="qrcode_title">请使用微信扫一扫</h3>
            <div class="qrcode_container clearfix">
              <div v-if="qrcode_mask" class="mask clearfix">
                <i
                  class="el-icon-refresh-left"
                  @click="handleQrcode"
                  v-if="qrcode_loading == 1"
                ></i>
                <i class="el-icon-loading" v-if="qrcode_loading == 2"></i>
              </div>
              <img src="@/assets/images/qrcode.png" alt="" v-if="true" />
              <div id="qrcode" class="clearfix"></div>
              <div class="clearfix"></div>
            </div>
            <!-- style="color: #e84b4b" -->
            <div class="tips">
              <span
                :style="{
                  color: qrcode_tips_type == 1 ? '#e84b4b' : '#03a98e',
                }"
                >{{ qrcode_tips }}</span
              >
            </div>
          </div>
        </div>
      </div>

      <div class="login_fo">
        技术支持：
        <a href="http://www.caidj.cn/" target="_black">菜东家</a
        >&nbsp;&nbsp;&nbsp;版本：{{
          this.info.ver || "1.0.0"
        }}&nbsp;&nbsp;&nbsp; 联系我们：400-656-9798
      </div>

      <div class="logo2"></div>
      <div class="logo3"></div>

      <!-- 图形验证 -->
      <div class="puzzle-box" v-if="isVerificationShow">
        <PuzzleVerification
          v-model="isVerificationShow"
          :puzzleImgList="puzzleImgList"
          blockType="puzzle"
          width="300"
          height="175"
          blockSize="40"
          @close="close"
          :onSuccess="handleSuccess"
        />
      </div>
    </div>
  </div>
</template>

<script>
import { mapActions, mapMutations } from "vuex";
import rules from "@/rules/login";

import PuzzleVerification from "@/components/public/puzzleVerification";
import { info } from "@/api/login";
import { scan_info, code_status } from "@/api/scan_login";
import { apiUrl, objKeySort, Md5 } from "@/utils/public";
import QRCode from "qrcodejs2";
import { setToken } from "@/utils/auth";
import {
  getPermissionToken,
  setPermissionToken,
  removePermissionToken,
} from "@/utils/auth";

export default {
  name: "Login",
  components: {
    PuzzleVerification,
  },
  data() {
    return {
      rowname: "",
      // 图片验证
      puzzleImgList: [
        require("../../assets/images/thumbnail-img02.jpg"),
        require("../../assets/images/thumbnail-img03.jpg"),
        require("../../assets/images/timg.jpg"),
      ],
      isVerificationShow: false,
      // 验证
      rules,
      // 登录
      loginForm: {
        remember: false,
        username: "",
        password: "",
      },
      loading: false,
      passwordType: "password",
      redirect: undefined,
      // 登陆信息
      info: {
        site_title: "菜东家",
        info: {
          company_name: "菜东家",
        },
      },
      // 登录 1  账号密码  2  扫码登录
      login_type: 1,
      // 加载loading 2  加载中  1  刷新
      qrcode_loading: 2,
      qrcode_mask: true,
      qrcode_tips: "",
      qrcode_tips_type: 0,
      QRCode,

      qrCodeId: "",
      uuid: "",
      // 轮询计时器
      timer: "",
      showDouYin: false, //判断抖音二维码
      showWchar: false, //判断微信二维码
      showAppview: false, //判断屏幕
    };
  },
  computed: {
    expirationWarning() {
      const daysSinceEnd = Math.abs(
        Math.floor((new Date().getTime() - this.info.info.end_time * 1000) / 86400000)
      );
      if (daysSinceEnd >= -30 && daysSinceEnd < 0) {
        return `温馨提醒：您的系统还有${daysSinceEnd}天到期！`;
      } else {
        return '';
      }
    }
  },
  methods: {
    ...mapActions({
      login: "user/login",
      remember: "user/remember",
      set_permisson: "app/set_permisson",
    }),
    ...mapMutations({
      SET_INDEX_SETTING: "user/SET_INDEX_SETTING",
      SET_TOKEN: "user/SET_TOKEN",
    }),
    changeRember(val) {
      this.remember(val);
    },
    // 图片验证成功 {}
    handleSuccess() {
      let data = Object.assign(
        this.loginForm,
        {
          code: this.info.code,
        },
        apiUrl().name
      );

      this.remember(this.loginForm.remember);
      this.login(data).then((res) => {
        if (res.errcode == 0) {
          localStorage.setItem("loginForm", JSON.stringify(this.loginForm));
          this.$router.push({ path: "/" });
          setTimeout(() => {
            this.isVerificationShow = false;
          }, 500);
        } else {
          this.$message.error(res.errmsg);
          this.info.code = res.data.code;
          this.isVerificationShow = false;
        }
      });
    },
    // 图片验证关闭
    close() {
      this.isVerificationShow = false;
    },
    // 忘记密码？
    forget() {
      this.$confirm("请联系客服，电话：" + this.info.info.mobile + "", "提示", {
        confirmButtonText: "确定",
        showCancelButton: false,
      })
        .then(() => {})
        .catch(() => {});
    },
    // 显示密码
    showPwd() {
      if (this.passwordType === "password") {
        this.passwordType = "";
      } else {
        this.passwordType = "password";
      }
      this.$nextTick(() => {
        this.$refs.password.focus();
      });
    },
    // 登录
    handleLogin() {
      this.$refs.loginForm.validate((valid) => {
        if (valid) {
          this.isVerificationShow = true;
        } else {
          return false;
        }
      });
    },
    // 登陆信息
    infoin() {
      let data = Object.assign(
        apiUrl().name
      );
      info(data).then((res) => {
        if (res.errcode == 0) {
          this.info = res.data;

          setPermissionToken(JSON.stringify(res.data.info.domestic));
        } else {
          this.$message.error(res.errmsg);
        }
      });
    },
    // 登录类型切换
    changeLoginType(type) {
      this.login_type = type;
      if (type == 2) {
        this.scan_info();
      } else if (type == 1) {
        clearInterval(this.timer);
      }
    },
    // 扫码登录获取二维码
    scan_info() {
      this.qrcode_mask = true;
      this.qrcode_loading == 2;
      this.qrcode_tips_type = 0;
      this.qrcode_tips = "请使用微信扫码登录";
      if (document.querySelector("#qrcode")) {
        document.querySelector("#qrcode").innerHTML = "";
      }
      scan_info().then((res) => {
        if (res.errcode == 0) {
          let url = res.data.url;
          let uuid = url.split("uuid=")[1];
          this.uuid = uuid;
          this.$nextTick(() => {
            let qrcode = new QRCode("qrcode", {
              width: 220,
              height: 220,
              text: url,
            });
            this.qrcode_mask = false;
          });
          this.timer = setInterval(() => {
            this.code_status();
          }, 1000);
        } else {
          this.$message.error(res.errmsg);
        }
      });
    },
    // 是否扫码轮询
    code_status() {
      let data = { uuid: this.uuid };
      code_status(data).then((res) => {
        if (res.errcode == 0) {
          // 成功
          this.SET_TOKEN(res.data.token);
          setToken(res.data.token, false);
          this.$router.push({ path: "/" });
          clearInterval(this.timer);
        } else if (res.errcode == 1) {
          // 登录中
          console.log("登录中");
          this.qrcode_tips = res.errmsg;
          this.qrcode_mask = false;
          this.qrcode_loading = 2;
        } else {
          // 失败
          console.log("失败");
          this.qrcode_tips = res.errmsg;
          this.qrcode_tips_type = 1;
          this.qrcode_mask = true;
          this.qrcode_loading = 1;
          clearInterval(this.timer);
        }
      });
    },
    // 刷新二维码
    handleQrcode() {
      this.scan_info();
    },

    onMouseenter(key) {
      if (key == "dy") this.showDouYin = true;
      else if (key == "wx") this.showWchar = true;
    },
    onMouseLeave(key) {
      if (key == "dy") this.showDouYin = false;
      else if (key == "wx") this.showWchar = false;
    },
    // 获取屏幕大小
    getScreenWidth() {
      let screenWidth = window.screen.width;
      let screenHeight = window.screen.height;
      if (screenWidth < 400) {
        this.showAppview = true;
      } else {
        this.showAppview = false;
      }
    },
  },
  created() {
    // 登陆信息
    this.infoin();
    if (localStorage.getItem("loginForm")) {
      if (JSON.parse(localStorage.getItem("loginForm")).remember) {
        this.loginForm = JSON.parse(localStorage.getItem("loginForm"));
      }
    }
    this.getScreenWidth();
  },
  mounted() {
    console.log(this.$route, "this");
    if (localStorage.getItem("rowname")) {
      let rowname = JSON.parse(localStorage.getItem("rowname"));
      console.log(rowname, "rowname");
      this.rowname = rowname;
      this.loginForm.username = rowname;
      this.loginForm.password = "";

      // 在这里使用数据
    } else {
      // 数据不存在
    }

    const { name } = this.$route.query;
    // console.log("name", name);
    if (name) {
      this.rowname = name;
    }
  },
  destroyed() {
    clearInterval(this.timer);
    if (localStorage.getItem("rowname")) {
      localStorage.removeItem("rowname");
    }
  },
};
</script>
<style lang="scss" scoped>
@import "@/styles/variables.scss";

.bgimg {
  background: url("../../assets/images/login/login_background.png") no-repeat;
  background-size: 100% 100%;
}

.bgimg-app {
  background: url("../../assets/images/login/login_background.png") no-repeat;
  background-position: bottom;
}

.login-container {
  min-height: 100%;
  width: 100%;
  overflow: hidden;

  /deep/.el-form-item--mini.el-form-item,
  /deep/.el-form-item--small.el-form-item {
    margin-bottom: 25px;
  }

  .puzzle-box {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9;
    background: rgba(0, 0, 0, 0.5);
    user-select: none;

    .puzzle-container {
      width: fit-content;
      height: fit-content;
      margin: auto;
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
    }
  }

  .title-ts {
    color: $colour_red;
    font-size: $font_14;
    text-align: center;
    position: absolute;
    width: 100%;
    top: -30px;
  }

  .login_ti {
    position: absolute;
    top: 30px;
    left: 30px;
    font-style: italic;
    color: $menuActiveText;
    font-size: $font_18;
    font-weight: bold;
  }

  .login_fo {
    font-size: 20px;
    font-family: PingFang SC-Regular, PingFang SC;
    font-weight: 400;
    // color: #0eaa78;
    color: $colour_3;
    // font-size: $font_14;
    position: absolute;
    bottom: 20px;
    // width: 100%;
    text-align: right;
    right: 97px;

    a {
      color: $colour_3;
      // color: #0eaa78;
      // text-decoration: underline;

      &:hover {
        color: $menuActiveText;
      }
    }
  }

  .login-form {
    width: 400px;
    max-width: 100%;
    margin: auto;
    top: 25%;
    right: 0;
    left: 0;
    height: fit-content;
    padding: 30px;
    padding-top: 20px;

    // background-color: pink;
  }

  /deep/.el-form-item__error {
    margin-left: 10px;
  }

  /deep/.el-form-item {
    border: 1px solid $subActive;
    background: $white;
    border-radius: 5px;
    color: #454545;
  }

  /deep/.el-button {
    padding: 0;
    height: 40px;
    line-height: 35px;
    font-size: 16px;
    margin-bottom: 10px !important;
  }

  /deep/.el-input {
    display: inline-block;
    height: 40px;
    width: 85%;

    input {
      background: transparent;
      border: 0px;
      -webkit-appearance: none;
      border-radius: 0px;
      font-size: 16px;
      color: $colour_3;
      height: 40px;
      caret-color: $colour_3;
    }
  }

  .tips {
    font-size: $font_14;

    span {
      color: $menuActiveText;

      &:hover {
        cursor: pointer;
      }
    }
  }

  .svg-container {
    color: $white;
    vertical-align: middle;
    width: 5px;
    display: inline-block;
  }

  .title-container {
    position: relative;

    .title {
      font-size: 22px;
      color: $menuActiveText;
      margin: 0px auto 35px auto;
      text-align: center;
      font-weight: bold;
      height: 24px;
      line-height: 24px;
      overflow: hidden;
    }
  }

  .show-pwd {
    position: absolute;
    right: 15px;
    top: 3px;
    font-size: 20px;
    color: $subActive;
    white: pointer;
    user-select: none;

    &:hover {
      cursor: pointer;
    }
  }
}

.tip {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  position: relative;

  .line {
    width: 2px;
    background: #ddd;
    height: 16px;
    margin: 0 10px;
  }

  .official {
    color: #333;

    &:hover {
      text-decoration: underline;
    }
  }

  .code {
    position: absolute;
    top: 25px;
    width: 150px;
    height: 170px;
    background: #ffffff;
    box-shadow: 0px 3px 7px 0px rgba(4, 0, 0, 0.1);
    border-radius: 10px;

    img {
      width: 140px;
      height: 140ox;
      margin: 5px auto;
    }

    .douyintitle {
      font-size: 12px;
      font-family: PingFang SC;
      font-weight: 500;
      color: #808080;
      margin-top: -3px;
      text-align: center;
    }
  }

  .douyin {
    left: 45px;
  }

  .wchar {
    left: 120px;
  }

  .show {
    display: flex !important;
  }

  .hide {
    display: none !important;
  }
}

.middle_box {
  width: 40%;
  height: 60%;
  position: absolute;
  top: 20%;
  right: 100px;
  display: flex;
}

.middle_container {
  width: 400px;
  min-height: 380px;
  margin: auto;
  height: fit-content;
  -moz-box-shadow: 0 2px 14px $subActive;
  -webkit-box-shadow: 0 2px 14px $subActive;
  box-shadow: 0 2px 14px $subActive;
  border-radius: 5px;
  background: $white;

  .middle_container_header {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    user-select: none;

    span {
      font-size: 16px;

      &:last-child {
        // font-size: 24px;
      }
    }
  }
}

.qrcode_box {
  width: 100%;
  min-height: 330px;
  padding: 25px 50px;

  .qrcode_title {
    text-align: center;
    font-size: 16px;
    color: #181818;
  }

  .qrcode_container {
    width: 240px;
    height: 240px;
    margin: 0 auto;
    position: relative;
    padding: 20px;
    user-select: none;

    img {
      width: 100%;
      user-select: none;
    }

    .mask {
      width: 240px;
      height: 240px;
      position: absolute;
      top: 0;
      left: 0;
      background-color: rgba(0, 0, 0, 0.68);
      z-index: 10;
      text-align: center;
      line-height: 220px;
      color: #fff;
      font-size: 28px;
      user-select: none;
    }
  }

  #qrcode {
    width: 220px;
    height: 220px;
    position: absolute;
    top: 10px;
    left: 10px;
  }

  .tips {
    margin: 0 auto;
    text-align: center;
    padding-top: 15px;
    min-height: 32px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #7e7e7e;
  }
}

.logo {
  width: 136px;
  height: 35px;
}

.logo1 {
  width: 260px;
  height: 30px;
  margin-left: 10px;
}

// .logo {
//   background-image: url("../../assets/images/Group8.png");
//   background-size: 100% 100%;
//   width: 14.8vw;
//   height: 71px;
//   position: absolute;
//   top: 0;
//   left: 282px;
// }

.logo2 {
  background-image: url("../../assets/images/Group9.png");
  background-size: cover;
  width: 740px;
  height: 80px;
  position: absolute;
  top: 16.7%;
  left: 184px;
}

.logo3 {
  background-image: url("../../assets/images/Maskgroup.png");
  background-size: 100% 100%;
  width: 36%;
  height: 390px;
  position: absolute;
  top: 30%;
  left: 282px;
}

/* 兼容app */
.logo1-app {
  width: 120px;
  height: 35px;
}

.logo2-app {
  width: 240px;
  height: 30px;
  margin-left: 10px;
}

.login_fo-app {
  font-size: 10px;
  font-family: PingFang SC-Regular, PingFang SC;
  font-weight: 400;
  // color: #0eaa78;
  color: $colour_3;
  // font-size: $font_14;
  position: absolute;
  bottom: 20px;
  // width: 100%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;

  a {
    color: $colour_3;
    // color: #0eaa78;
    // text-decoration: underline;

    &:hover {
      color: $menuActiveText;
    }
  }
}

.middle_box-app {
  width: 90%;
  height: 60%;
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}

.middle_container-app {
  width: 100%;
  min-height: 380px;
  margin: auto;
  height: fit-content;
  -moz-box-shadow: 0 2px 14px $subActive;
  -webkit-box-shadow: 0 2px 14px $subActive;
  box-shadow: 0 2px 14px $subActive;
  border-radius: 5px;
  background: $white;
}
</style>
